import { Pipe, PipeTransform } from "@angular/core";

@Pipe({
  name: "decimal"
})
export class DecimalPipe implements PipeTransform {
  transform(value: string) {
    if(value === undefined || value === null || value.toString() === "")
      return value;
    if(value.length > 7 ) {
      return value.substring(0, value.length - 4) + value.substring(value.length - 1, value.length);
    } else {
      return value;
    }
  }
}